package com.oop.InterfaceIsolation;

/**
 * @author Vhong
 * @version 1.0
 */
public class Bird {
    public void hunt(BehaviorOne one) {
        one.hunt();
    }

    public void slide(BehaviorThree three) {
        three.glide();
    }

    public void fly(BehaviorThree three) {
        three.fly();
    }
}

class Dove implements BehaviorOne, BehaviorThree {
    private String name;

    public Dove(String name) {
        this.name = name;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    @Override
    public void hunt() {
        System.out.println(name + "正在捕食ing...");
    }

    @Override
    public void glide() {
        System.out.println(name + "正在滑翔ing...");
    }

    @Override
    public void fly() {
        System.out.println(name + "正在飞翔ing...");
    }
}
